import { closePopperDirective } from '/@/directive/close-popper'
import type { App } from 'vue'
import { authDirective } from '/@/directive/auth-directive'
import { dragDirective, wavesDirective } from '/@/directive/custom-directive'

/**
 * 导出指令方法：v-xxx
 * @function authDirective 用户权限指令，用法：v-auth
 * @function wavesDirective 按钮波浪指令，用法：v-waves
 * @function dragDirective 自定义拖动指令，用法：v-drag
 * @param {App} app app实例
 */
export function directive(app: App) {
  // 用户权限指令
  authDirective(app)
  // 按钮波浪指令
  wavesDirective(app)
  // 自定义拖动指令
  dragDirective(app)
  // 滚动时关闭页面所有popper弹出层
  closePopperDirective(app)
}
